package com.imrookie.gendoc.apiword.template;

import com.imrookie.wrap.FieldWrap;

/**
 * @author wangjiyu@imdada.cn
 * @create 2018/12/29
 */
public class ApiFieldTemplate {
    private int no;
    private String name;
    private String type;
    private String must = "是";
    private String remark = "xxxx";

    public ApiFieldTemplate() {
    }

    public ApiFieldTemplate(int no, FieldWrap fieldWrap) {
        this.no = no;
        this.name = fieldWrap.getFieldName();
        if (fieldWrap.getGenericWrap() != null && fieldWrap.getGenericWrap().isGenericFlag()) {
            this.type = fieldWrap.getGenericWrap().toStatement();
        } else {
            this.type = fieldWrap.getClassWrap().getClassName();
        }
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMust() {
        return must;
    }

    public void setMust(String must) {
        this.must = must;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
